<?xml version="1.0"?>
<Schema name="DTMCIPDataTypeSchema" xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes" xmlns:fdt="x-schema:FDTDataTypesSchema.xml" xmlns:dtminfo="x-schema:DTMInformationSchema.xml">
	<!-- Version of the Schema -->
	<AttributeType name="schemaVersion" dt:type="number" default="1.0"/>
	<!-- Definition of Attributes -->
	<AttributeType name="classId" dt:type="ui2"/>
	<AttributeType name="instanceId" dt:type="ui2"/>
	<AttributeType name="attributeId" dt:type="ui1"/>
	<AttributeType name="vendorID" dt:type="ui2"/>
	<AttributeType name="deviceType" dt:type="ui2"/>
	<AttributeType name="productCode" dt:type="ui2"/>
	<AttributeType name="majorRevision" dt:type="ui1"/>
	<AttributeType name="minorRevision" dt:type="ui1"/>
	<AttributeType name="serialNumber" dt:type="bin.hex"/>
	<AttributeType name="productName" dt:type="string"/>
	<AttributeType name="cipStatus" dt:type="ui2"/>
	<AttributeType name="portNumber" dt:type="ui2"/>
	<AttributeType name="extendedIdentifier" dt:type="string"/>
	<AttributeType name="shortIdentifier" dt:type="ui1"/>
	<AttributeType name="serviceCode" dt:type="ui1"/>
	<AttributeType name="serviceName" dt:type="string"/>
	<!-- refer to CIP Spec datatype definition Vol 1 C-2 through C-6 -->
	<AttributeType name="dataType" dt:type="enumeration" dt:values="byte float double int unsigned enumerator bitEnumerator index ascii password bitString hexString date time dateAndTime duration binary structured dtmSpecific"/>
  <AttributeType name="ePath" dt:type="bin.hex"/>
	<AttributeType name="bitOffset" dt:type="ui4"/>
	<AttributeType name="constValue" dt:type="ui4"/>
	<AttributeType name="symbolicAddress" dt:type="string"/>
	<!--Definition of Elements-->
	<ElementType name="Service" content="empty" model="closed">
	  <attribute type="fdt:nodeId" required="no"/>
		<attribute type="serviceCode" required="yes"/>
		<attribute type="serviceName" required="no"/>
	</ElementType>

	<ElementType name="CIPObjectId" content="empty" model="closed">
		<attribute type="fdt:nodeId" required="no"/>
		<attribute type="classId" required="yes"/>
		<attribute type="instanceId" required="yes"/>
		<attribute type="attributeId" required="no"/>
	</ElementType>

	<ElementType name="CIPSymbolicAddress" content="empty" model="closed">
		<attribute type="fdt:nodeId" required="no"/>
		<attribute type="symbolicAddress" required="yes"/>
	</ElementType>

  <!-- See CIP Specification Appendix C-1 -->
	<ElementType name="HexAddress" content="empty" model="closed">
	  <attribute type="fdt:nodeId" required="no"/>
		<attribute type="ePath" required="yes"/>
	</ElementType>

	<ElementType name="CIPObjectAddress" content="eltOnly" model="closed">
	  <attribute type="fdt:nodeId" required="no"/>
		<group order="one" minOccurs="1" maxOccurs="1">
			<element type="CIPObjectId"/>
			<element type="CIPSymbolicAddress"/>
			<element type="HexAddress"/>
		</group>
	</ElementType>

	<ElementType name="ParameterReference" content="empty"  model="closed">
		<attribute type="fdt:nodeId" required="no"/>
		<attribute type="fdt:idref" required="yes"/>
		<attribute type="bitOffset" required="no"/>
	</ElementType>
	
	<ElementType name="Constant">
	  <attribute type="fdt:nodeId" required="no"/>
		<attribute type="constValue" required="yes"/>
	</ElementType>

	<ElementType name="ExtendedIdentifier" content="empty" model="closed">
	  <attribute type="fdt:nodeId" required="no"/>
		<attribute type="extendedIdentifier" required="yes"/>
	</ElementType>

	<ElementType name="ShortIdentifier" content="empty" model="closed">
		<attribute type="fdt:nodeId" required="no"/>
		<attribute type="shortIdentifier" required="yes"/>
	</ElementType>

	<ElementType name="CIPNodeID" content="eltOnly" model="closed">
	  <attribute type="fdt:nodeId" required="no"/>
 		<group order="one" minOccurs="1" maxOccurs="1">
			<element type="ExtendedIdentifier"/>
			<element type="ShortIdentifier"/>
		</group>
    </ElementType>

	<ElementType name="LinkAddress" content="eltOnly" model="closed">
	  <attribute type="fdt:nodeId" required="no"/>
		<element type="CIPNodeID" minOccurs="1" maxOccurs="1"/>
	</ElementType>
  
	<ElementType name="Segment" content="eltOnly" model="closed">
		<attribute type="fdt:nodeId" required="no"/>
		<attribute type="portNumber" required="yes"/>
		<element   type="LinkAddress" minOccurs="1" maxOccurs="1"/>
		<element   type="Segment" minOccurs="0" maxOccurs="1"/>
	</ElementType>
	
	<ElementType name="RoutingPath" content="eltOnly" model="closed">
	  <attribute type="fdt:nodeId" required="no"/>
		<element   type="Segment" minOccurs="1" maxOccurs="1"/>
	</ElementType>

	<ElementType name="CIPPath" content="eltOnly" model="closed">
		<attribute type="fdt:nodeId" required="no"/>
		<element   type="RoutingPath" minOccurs="0" maxOccurs="1"/>
		<element   type="CIPNodeID" minOccurs="1" maxOccurs="1"/>
	</ElementType>

	<ElementType name="CIPDeviceIdentity" content="empty" model="closed">
		<attribute type="fdt:nodeId" required="no"/>
		<attribute type="vendorID" required="yes"/> <!-- Identity Object Attribute 1 -->
		<attribute type="deviceType" required="yes"/> <!-- Identity Object Attribute 2 -->
		<attribute type="productCode" required="yes"/> <!-- Identity Object Attribute 3 -->
		<attribute type="majorRevision" required="yes"/> <!-- Identity Object Attribute 4.1 -->
		<attribute type="minorRevision" required="yes"/> <!-- Identity Object Attribute 4.2 -->
		<attribute type="serialNumber" required="yes"/> <!-- Identity Object Attribute 6 -->
		<attribute type="productName" required="yes"/> <!-- Identity Object Attribute 7 -->
	</ElementType>

	<ElementType name="CIPDevice" content="eltOnly" model="closed">
		<attribute type="fdt:nodeId" required="no"/>
		<attribute type="cipStatus" required="yes"/> <!-- Identity Object Attribute 5 -->
		<element type="CIPPath" minOccurs="1" maxOccurs="1"/>
		<element type="CIPDeviceIdentity" minOccurs="1" maxOccurs="1"/>
	</ElementType>

	<!-- used for reserved bits anywhere -->
	<ElementType name="ReservedBits" content="eltOnly" model="open">
	</ElementType>
  
</Schema>
